<%@ Page Title="" Debug="true" Language="C#" MasterPageFile="~/Views/Shared/User.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="CDIO1.Models" %>

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           
            lbUserName.Text = "" + ViewData["userName"];

        }

    }
   
 
    protected void ContinuePushButton_Click(object sender, EventArgs e)
    {
        Response.Redirect("/Home/ChangePassword");

    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ChangePassword
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h1 style="color: white; background-color: #0033CC">ChangePassword</h1>
    <br />
    <span style="font-size: medium; color: #0066CC">Username</span>:
    <asp:Label ID="lbUserName" runat="server" Font-Bold="True" Font-Italic="True" 
        style="font-size: medium; color: #0000FF" Text="Label"></asp:Label>
    <br />
    <br />
        <asp:ChangePassword ID="ChangePassword1" runat="server" BackColor="#E3EAEB" 
            BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" 
            Font-Names="Verdana" Font-Size="0.8em" Height="152px" Width="360px">
            <CancelButtonStyle BackColor="White" BorderColor="#C5BBAF" BorderStyle="Solid" 
                BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#1C5E55" />
            <PasswordHintStyle Font-Italic="True" ForeColor="#1C5E55" />
            <ContinueButtonStyle BackColor="White" BorderColor="#C5BBAF" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                ForeColor="#1C5E55" />
            <ChangePasswordButtonStyle BackColor="White" BorderColor="#C5BBAF" 
                BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" 
                ForeColor="#1C5E55" />
            <TitleTextStyle BackColor="#1C5E55" Font-Bold="True" Font-Size="0.9em" 
                ForeColor="White" />
            <ChangePasswordTemplate>
                <table border="0" cellpadding="4" cellspacing="0" 
                    style="border-collapse:collapse;">
                    <tr>
                        <td>
                            <table border="0" cellpadding="0">
                                <tr>
                                    <td align="center" colspan="2" 
                                        
                                        style="color:#CC3300; font-size:medium; font-weight:bold;">
                                        Change Your Password</td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="CurrentPasswordLabel" runat="server" 
                                            AssociatedControlID="CurrentPassword" style="font-size: medium">Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="CurrentPassword" runat="server" Font-Size="0.8em" 
                                            TextMode="Password" Height="25px" Width="134px" style="font-size: large"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" 
                                            ControlToValidate="CurrentPassword" ErrorMessage="Password is required." 
                                            ToolTip="Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="NewPasswordLabel" runat="server" 
                                            AssociatedControlID="NewPassword" style="font-size: medium">New Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="NewPassword" runat="server" Font-Size="0.8em" 
                                            TextMode="Password" Height="25px" Width="134px" style="font-size: large"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" 
                                            ControlToValidate="NewPassword" ErrorMessage="New Password is required." 
                                            ToolTip="New Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="ConfirmNewPasswordLabel" runat="server" 
                                            AssociatedControlID="ConfirmNewPassword" style="font-size: medium">Confirm 
                                        New Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="ConfirmNewPassword" runat="server" Font-Size="0.8em" 
                                            TextMode="Password" Height="25px" Width="134px" style="font-size: large"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" 
                                            ControlToValidate="ConfirmNewPassword" 
                                            ErrorMessage="Confirm New Password is required." 
                                            ToolTip="Confirm New Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Button ID="ChangePasswordPushButton" runat="server" BackColor="White" 
                                            BorderColor="#C5BBAF" BorderStyle="Solid" BorderWidth="1px" 
                                            CommandName="ChangePassword" Font-Names="Verdana" Font-Size="0.8em" 
                                            ForeColor="#1C5E55" 
                                            
                                            style="font-size: medium; color: #FFFFFF; background-color: #3366FF; text-align: center;" Text="Change Password" 
                                            ValidationGroup="ChangePassword1" Width="170px" />
                                    </td>
                                    <td>
                                        <asp:Button ID="CancelPushButton" runat="server" BackColor="White" 
                                            BorderColor="#C5BBAF" BorderStyle="Solid" BorderWidth="1px" 
                                            CausesValidation="False" CommandName="Cancel" Font-Names="Verdana" 
                                            Font-Size="0.8em" ForeColor="#1C5E55" 
                                            style="font-size: medium; color: #FFFFFF; background-color: #3366FF; text-align: center;" 
                                            Text="Cancel" Width="116px" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ChangePasswordTemplate>
            <SuccessTemplate>
                <table border="0" cellpadding="4" cellspacing="0" 
                    style="border-collapse:collapse;">
                    <tr>
                        <td>
                            <table border="0" cellpadding="0" style="height:152px;width:359px;">
                                <tr>
                                    <td align="center" 
                                        
                                        style="color:White;background-color:#3333FF; font-size:medium; font-weight:bold;">
                                        Change Password Complete</td>
                                </tr>
                                <tr>
                                    <td style="font-size: medium">
                                        Your password has been changed!</td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Button ID="ContinuePushButton" runat="server" BackColor="White" 
                                            BorderColor="#C5BBAF" BorderStyle="Solid" BorderWidth="1px" 
                                            CausesValidation="False" CommandName="Continue" Font-Names="Verdana" 
                                            Font-Size="0.8em" ForeColor="#1C5E55" onclick="ContinuePushButton_Click" 
                                            Text="Continue" 
                                            style="font-size: medium; color: #FFFFFF; background-color: #0066FF;" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </SuccessTemplate>
            <TextBoxStyle Font-Size="0.8em" />
            <InstructionTextStyle Font-Italic="True" ForeColor="Black" />
        </asp:ChangePassword>
    
</asp:Content>
